import request from '@/utils/request'

// 查询主题列表
export function listThread(query) {
  return request({
    url: '/bbs/thread/list',
    method: 'get',
    params: query
  })
}

// 查询主题详细
export function getThread(tid) {
  return request({
    url: '/bbs/thread/' + tid,
    method: 'get'
  })
}

// 新增主题
export function addThread(data) {
  return request({
    url: '/bbs/thread',
    method: 'post',
    data: data
  })
}

// 修改主题
export function updateThread(data) {
  return request({
    url: '/bbs/thread',
    method: 'put',
    data: data
  })
}

// 删除主题
export function delThread(tid) {
  return request({
    url: '/bbs/thread/' + tid,
    method: 'delete'
  })
}
